[INFO] cloning repository https://github.com/abaderin/rust_in_action
[INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/abaderin/rust_in_action" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fabaderin%2Frust_in_action", kill_on_drop: false }`
[INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fabaderin%2Frust_in_action'...
[INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }`
[INFO] [stdout] 3d8c81591900b42731a1dddcb0a5ea11bd3bae10
[INFO] fixing abaderin/rust_in_action against try#622891a4e29178280638a6b63a8908bde2c0c854+cargoflags=-Zfix-edition=start=2015 for pr-157817-2
[INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fabaderin%2Frust_in_action" "/workspace/builds/worker-2-tc1/source", kill_on_drop: false }`
[INFO] [stderr] Cloning into '/workspace/builds/worker-2-tc1/source'...
[INFO] [stderr] done.
[INFO] started tweaking git repo https://github.com/abaderin/rust_in_action
[INFO] removed 0 missing examples
[INFO] finished tweaking git repo https://github.com/abaderin/rust_in_action
[INFO] tweaked toml for git repo https://github.com/abaderin/rust_in_action written to /workspace/builds/worker-2-tc1/source/Cargo.toml
[INFO] validating manifest of git repo https://github.com/abaderin/rust_in_action on toolchain 622891a4e29178280638a6b63a8908bde2c0c854
[INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+622891a4e29178280638a6b63a8908bde2c0c854" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }`
[INFO] crate git repo https://github.com/abaderin/rust_in_action already has a lockfile, it will not be regenerated
[INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+622891a4e29178280638a6b63a8908bde2c0c854" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/source:/opt/rustwide/workdir:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-m" "1610612736" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:3a6becf2bc8dde7f3fa57ede90e4f284e72d296796fc446bbb1e2c7cc0530151" "sleep" "infinity", kill_on_drop: false }`
[INFO] [stdout] 4b72541f0436356c44051e0964e1923c3be5ec254d9651632c5cc302c4cf79bc
[INFO] running `Command { std: "docker" "start" "4b72541f0436356c44051e0964e1923c3be5ec254d9651632c5cc302c4cf79bc", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "exec" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-w" "/opt/rustwide/workdir" "--user" "0:0" "4b72541f0436356c44051e0964e1923c3be5ec254d9651632c5cc302c4cf79bc" "/opt/rustwide/cargo-home/bin/cargo" "+622891a4e29178280638a6b63a8908bde2c0c854" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "inspect" "4b72541f0436356c44051e0964e1923c3be5ec254d9651632c5cc302c4cf79bc", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "exec" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=" "-e" "RUSTDOCFLAGS=" "-w" "/opt/rustwide/workdir" "--user" "0:0" "4b72541f0436356c44051e0964e1923c3be5ec254d9651632c5cc302c4cf79bc" "/opt/rustwide/cargo-home/bin/cargo" "+622891a4e29178280638a6b63a8908bde2c0c854" "fix" "--allow-no-vcs" "--allow-dirty" "--frozen" "--all" "--all-targets" "--message-format=json" "-Zfix-edition=start=2015", kill_on_drop: false }`
[INFO] [stderr]     Checking rust_in_action v0.1.0 (/opt/rustwide/workdir)
[INFO] [stdout] error[E0373]: closure may outlive the current function, but it borrows `data`, which is owned by the current function
[INFO] [stdout]  --> src/chapter01/race_condition.rs:6:19
[INFO] [stdout]   |
[INFO] [stdout] 6 |     thread::spawn(|| { data = 500; });
[INFO] [stdout]   |                   ^^   ---- `data` is borrowed here
[INFO] [stdout]   |                   |
[INFO] [stdout]   |                   may outlive borrowed value `data`
[INFO] [stdout]   |
[INFO] [stdout] note: function requires argument type to outlive `'static`
[INFO] [stdout]  --> src/chapter01/race_condition.rs:6:5
[INFO] [stdout]   |
[INFO] [stdout] 6 |     thread::spawn(|| { data = 500; });
[INFO] [stdout]   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout] help: to force the closure to take ownership of `data` (and any other referenced variables), use the `move` keyword
[INFO] [stdout]   |
[INFO] [stdout] 6 |     thread::spawn(move || { data = 500; });
[INFO] [stdout]   |                   ++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0499]: cannot borrow `data` as mutable more than once at a time
[INFO] [stdout]  --> src/chapter01/race_condition.rs:7:19
[INFO] [stdout]   |
[INFO] [stdout] 6 |     thread::spawn(|| { data = 500; });
[INFO] [stdout]   |     ---------------------------------
[INFO] [stdout]   |     |             |    |
[INFO] [stdout]   |     |             |    first borrow occurs due to use of `data` in closure
[INFO] [stdout]   |     |             first mutable borrow occurs here
[INFO] [stdout]   |     argument requires that `data` is borrowed for `'static`
[INFO] [stdout] 7 |     thread::spawn(|| { data = 1000; });
[INFO] [stdout]   |                   ^^   ---- second borrow occurs due to use of `data` in closure
[INFO] [stdout]   |                   |
[INFO] [stdout]   |                   second mutable borrow occurs here
[INFO] [stdout]   |
[INFO] [stdout] note: requirement that the value outlives `'static` introduced here
[INFO] [stdout]  --> /rustc/622891a4e29178280638a6b63a8908bde2c0c854/library/std/src/thread/functions.rs:128:14
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0373]: closure may outlive the current function, but it borrows `data`, which is owned by the current function
[INFO] [stdout]  --> src/chapter01/race_condition.rs:7:19
[INFO] [stdout]   |
[INFO] [stdout] 7 |     thread::spawn(|| { data = 1000; });
[INFO] [stdout]   |                   ^^   ---- `data` is borrowed here
[INFO] [stdout]   |                   |
[INFO] [stdout]   |                   may outlive borrowed value `data`
[INFO] [stdout]   |
[INFO] [stdout] note: function requires argument type to outlive `'static`
[INFO] [stdout]  --> src/chapter01/race_condition.rs:7:5
[INFO] [stdout]   |
[INFO] [stdout] 7 |     thread::spawn(|| { data = 1000; });
[INFO] [stdout]   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout] help: to force the closure to take ownership of `data` (and any other referenced variables), use the `move` keyword
[INFO] [stdout]   |
[INFO] [stdout] 7 |     thread::spawn(move || { data = 1000; });
[INFO] [stdout]   |                   ++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0502]: cannot borrow `data` as immutable because it is also borrowed as mutable
[INFO] [stdout]  --> src/chapter01/race_condition.rs:8:20
[INFO] [stdout]   |
[INFO] [stdout] 6 |     thread::spawn(|| { data = 500; });
[INFO] [stdout]   |     ---------------------------------
[INFO] [stdout]   |     |             |    |
[INFO] [stdout]   |     |             |    first borrow occurs due to use of `data` in closure
[INFO] [stdout]   |     |             mutable borrow occurs here
[INFO] [stdout]   |     argument requires that `data` is borrowed for `'static`
[INFO] [stdout] 7 |     thread::spawn(|| { data = 1000; });
[INFO] [stdout] 8 |     println!("{}", data);
[INFO] [stdout]   |                    ^^^^ immutable borrow occurs here
[INFO] [stdout]   |
[INFO] [stdout] note: requirement that the value outlives `'static` introduced here
[INFO] [stdout]  --> /rustc/622891a4e29178280638a6b63a8908bde2c0c854/library/std/src/thread/functions.rs:128:14
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] Some errors have detailed explanations: E0373, E0499, E0502.
[INFO] [stdout] 
[INFO] [stdout] For more information about an error, try `rustc --explain E0373`.
[INFO] [stdout] 
[INFO] [stderr] error: could not compile `rust_in_action` (example "ch01_race_condition") due to 4 previous errors
[INFO] [stderr] warning: build failed, waiting for other jobs to finish...
[INFO] [stdout] error[E0382]: borrow of moved value: `grains`
[INFO] [stdout]   --> src/chapter01/dangling_pointer.rs:12:22
[INFO] [stdout]    |
[INFO] [stdout]  9 |     let mut grains: Vec<Cereal> = vec![];
[INFO] [stdout]    |         ---------- move occurs because `grains` has type `Vec<Cereal>`, which does not implement the `Copy` trait
[INFO] [stdout] 10 |     grains.push(Cereal::Rye);
[INFO] [stdout] 11 |     drop(grains);
[INFO] [stdout]    |          ------ value moved here
[INFO] [stdout] 12 |     println!("{:?}", grains);
[INFO] [stdout]    |                      ^^^^^^ value borrowed here after move
[INFO] [stdout]    |
[INFO] [stdout] note: if `Cereal` implemented `Clone`, you could clone the value
[INFO] [stdout]   --> src/chapter01/dangling_pointer.rs:2:1
[INFO] [stdout]    |
[INFO] [stdout]  2 | enum Cereal {
[INFO] [stdout]    | ^^^^^^^^^^^ consider implementing `Clone` for this type
[INFO] [stdout] ...
[INFO] [stdout] 11 |     drop(grains);
[INFO] [stdout]    |          ------ you could clone this value
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] For more information about this error, try `rustc --explain E0382`.
[INFO] [stdout] 
[INFO] [stderr] error: could not compile `rust_in_action` (example "ch01_dangling_pointer") due to 1 previous error
[INFO] running `Command { std: "docker" "inspect" "4b72541f0436356c44051e0964e1923c3be5ec254d9651632c5cc302c4cf79bc", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "rm" "-f" "4b72541f0436356c44051e0964e1923c3be5ec254d9651632c5cc302c4cf79bc", kill_on_drop: false }`
[INFO] [stdout] 4b72541f0436356c44051e0964e1923c3be5ec254d9651632c5cc302c4cf79bc
